//
//  NSObject+YCAlert.h
//  ychat
//
//  Created by 孙俊 on 2017/12/17.
//  Copyright © 2017年 Sun. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSObject (BWAlert)

/**
 弹出alertController，并且只有一个action按钮，切记只是警示作用，无事件处理
 
 @param title title
 @param message message
 @param confirmTitle confirmTitle 按钮的title
 */
- (UIAlertController *_Nullable)showAlertViewWithTitle:(NSString *_Nullable)title
                                               message:(NSString *_Nullable)message
                                          confirmTitle:(NSString *_Nullable)confirmTitle;
/**
 弹出alertController，并且只有一个action按钮，有处理事件
 
 @param title title
 @param message message
 @param confirmTitle confirmTitle 按钮title
 @param confirmAction 按钮的点击事件处理
 */
- (UIAlertController *_Nullable)showAlertViewWithTitle:(NSString *_Nullable)title
                                      message:(NSString *_Nullable)message
                                          confirmTitle:(NSString *_Nullable)confirmTitle
                                         confirmAction:(void(^_Nullable)(void))confirmAction;
/**
 弹出alertController，并且有两个个action按钮，分别有处理事件
 
 @param title title
 @param message Message
 @param confirmTitle 右边按钮的title
 @param cancelTitle 左边按钮的title
 @param confirmAction 右边按钮的点击事件
 @param cancelAction 左边按钮的点击事件
 */
- (UIAlertController *_Nullable)showAlertViewWithTitle:(NSString *_Nullable)title
                                               message:(NSString *_Nullable)message
                                          confirmTitle:(NSString *_Nullable)confirmTitle
                                           cancelTitle:(NSString *_Nullable)cancelTitle
                                         confirmAction:(void(^_Nullable)(void))confirmAction
                                          cancelAction:(void(^_Nullable)(void))cancelAction;

/// 获取当前控制器
- (UIViewController *_Nullable)getCurrentViewController;

@end
